# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>

pkgname=gnome-remote-desktop
pkgver=0.1.6
pkgrel=1
pkgdesc="GNOME Remote Desktop server"
url="https://wiki.gnome.org/Projects/Mutter/RemoteDesktop"
arch=(x86_64)
license=(GPL2)
depends=(glib2 pipewire systemd libvncserver libsecret libnotify dconf)
makedepends=(git meson)
groups=(gnome)
_commit=81ae42ee570fe44ce6a6ba89f671b587a2d22c54  # tags/0.1.6^0
source=("git+https://gitlab.gnome.org/jadahl/gnome-remote-desktop.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
  sed -i 's|pipewire-0\.1|pipewire-0.2|g' meson.build
}

build() {
  arch-meson $pkgname build
  ninja -C build
}

check() {
  meson test -C build
}

package() {
  DESTDIR="$pkgdir" meson install -C build
}
